//
//  GZJsonValue.h
//  GZJsonValue
//
//  Created by GR on 2019/1/8.
//  Copyright © 2019 GR. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface GZJsonValue : NSObject

+ (GZJsonValue *)valueWithObject:(id)objcet;

@property (readonly) NSString *string;
@property (readonly) NSNumber *number;

@property (readonly) NSDictionary *dictionary;
@property (readonly) NSArray *array;

- (GZJsonValue *)objectForKeyedSubscript:(NSString *)key;
- (GZJsonValue *)objectAtIndexedSubscript:(NSUInteger)idx;

@end

@interface GZJsonValue (NumericalValue)

@property (readonly) BOOL boolean;
@property (readonly) NSInteger integerValue;
@property (readonly) NSUInteger uintegerValue;
@property (readonly) double doubleValue;
@property (readonly) float floatValue;

@end

@interface GZJsonValue (Date)

@property (readonly) NSDate *date;
@property (readonly) NSDate *(^dateFormat)(NSString *format);

@end
